package controleurs;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import modele.ModeleMA;
import vues.MAFrame;

public class BoutonAjoutControlleur implements ActionListener{
	ModeleMA modele;
	MAFrame f;
	public BoutonAjoutControlleur(ModeleMA modele, MAFrame f){
		this.modele=modele;
		this.f=f;
	}
	public void actionPerformed(ActionEvent e) {
		if(((JButton)e.getSource()).getName().equals("validation"))
			modele.valider();
		else if(((JButton)e.getSource()).getName().equals("annulation"))
			modele.quitterAjout();			
	}

}
